<?php
/**
 * Created by PhpStorm.
 * User: 李京蔚
 * Date: 2018/6/11
 * Time: 9:35
 */
use Illuminate\Routing\Router;

//user
$router->group(['prefix' => '/user', 'namespace' => 'Users','middleware' => 'wxapp'], function () use ($router) {



    //getPunchTheClock
    $router->match(['post','get'],'/user/getPunchTheClock','WxappController@getPunchTheClock');

    /**
     * 打卡
     * 接口URL根地址: /api/user
     * 程序放在位置 /app/Api/Controller/WxappController.php/
     * 中间件: 无 认证中间件
     */
    $router->match(['post','get'],'/user/postPunchTheClock','WxappController@postPunchTheClock');

    //user/dlists
    $router->match(['post','get'],'/user/dlists','WxappController@development');

    ///user/userInfo
    $router->match(['post','get'],'/user/userInfo','WxappController@development');

    //考勤统计 user/get_static_punch
    $router->match(['post','get'],'/user/get_static_punch','WxappController@development');

});

//wxapp
$router->group(['prefix' => '/wxapp', 'namespace' => 'Users'], function () use ($router) {

    /**
     * 测试demo
     * 接口URL根地址: /api/demo
     * 程序放在位置 /app/Api/Controller/ApiController.php/
     * 中间件: 无 认证中间件
     */
    $router->match(['post','get'],'/public/login','WxappController@login');

});

//home
$router->group(['prefix' => '/home', 'namespace' => 'Users'],function () use ($router){

    /**
     * 服务器时间
     * 根路径: /home/
     * 控制器存放位置: app\Http\Controller\
     **/
    $router->match(['get','post'], '/slides/read','HomeController@read');

//    /**
//     * 服务器时间
//     * 根路径: /home/
//     * 控制器存放位置: app\Http\Controller\
//     **/
//    $router->match(['get','post'], '/NowDate','ApiController@NowDate');

});

//portal
$router->group(['prefix'=>'/portal','namespace'=>'Users'],function () use ($router){

    /**;
     * 首页公告列表
     * 接口URL根地址: /api/portal
     * 程序放在位置 /app/Api/Controller/ApiController.php/
     * 中间件: 无 认证中间件
     */
    $router->match(['post','get'],'/notice/index','HomeController@notice');

    //详情
    $router->match(['post','get'],'/notice/detail','HomeController@detail');

    //关于我们
    $router->match(['post','get'],'/user/aboutUs','WxappController@development');

    //我要预定页
    $router->match(['post','get'],'/order_food/order_setting','WxappController@development');
    //我的预定
    $router->match(['post','get'],'/order_food/index','WxappController@development');
    //用餐统计
    $router->match(['post','get'],'/order_food/order_static','WxappController@development');
    //立即预定
    $router->match(['post','get'],'/order_food/add','WxappController@development');


});

//work
$router->group(['prefix'=>'/work','namespace'=>'Users'],function () use ($router){


    //缺卡提醒
    $router->match(['post','get'],'/work/queka','WxappController@development');

    //我审批的
    $router->match(['post','get'],'/work/myApproval','WxappController@development');
    //我已审批
    $router->match(['post','get'],'/work/myAor','WxappController@development');
    //通讯录
    $router->match(['post','get'],'/book/departmentList','WxappController@development');
    //通讯..
    $router->match(['post','get'],'/book/index','WxappController@development');
    //我发起的
    $router->match(['post','get'],'/work/myStart','WxappController@development');
    //请假类型
    $router->match(['post','get'],'/leave/leaveType','WxappController@development');
    //考勤记录
    $router->match(['post','get'],'/work/getReviewed','WxappController@development');

});


